<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    166. Fraction to Recurring Decimal
   </h1>
   <p>
    Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.
   </p>
   <p>
    If the fractional part is repeating, enclose the repeating part in parentheses.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> numerator = 1, denominator = 2
<strong>Output:</strong> "0.5"
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> numerator = 2, denominator = 1
<strong>Output:</strong> "2"</pre>
   <p>
    <strong>
     Example 3:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> numerator = 2, denominator = 3
<strong>Output: </strong>"0.(6)"
</pre>
  </div>
  <div>
   <h1 class="question_title">
    166. 分数到小数
   </h1>
   <p>
    给定两个整数，分别表示分数的分子&nbsp;numerator 和分母 denominator，以字符串形式返回小数。
   </p>
   <p>
    如果小数部分为循环小数，则将循环的部分括在括号内。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> numerator = 1, denominator = 2
<strong>输出:</strong> "0.5"
</pre>
   <p>
    <strong>
     示例&nbsp;2:
    </strong>
   </p>
   <pre><strong>输入:</strong> numerator = 2, denominator = 1
<strong>输出:</strong> "2"</pre>
   <p>
    <strong>
     示例&nbsp;3:
    </strong>
   </p>
   <pre><strong>输入:</strong> numerator = 2, denominator = 3
<strong>输出: </strong>"0.(6)"
</pre>
  </div>
 </body>
</html>